package view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import java.awt.Font;
import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.JComboBox;
import javax.swing.JButton;
/**
 * Activate campaign
 * @author liran
 *
 */
public class StartCampignGui extends AbstractGUI {
/**
 * list campaign 
 */
	private JComboBox CampigncomboBox = null;
	/**
	 * active button
	 */
	private JButton btnStartButton = null;
	public JButton getBtnStartButton() {
		return btnStartButton;
	}

	public void setBtnStartButton(JButton btnStartButton) {
		this.btnStartButton = btnStartButton;
	}
	/**
	 * main menu
	 */
	private JButton btnMainMenu = null;

	private JLabel lblwarning;

	public JComboBox<String> getCampigncomboBox() {
		return CampigncomboBox;
	}

	public void setCampigncomboBox(JComboBox<String> campigncomboBox) {
		CampigncomboBox = campigncomboBox;
	}

	/**
	 * Create the frame.
	 */
	public StartCampignGui() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(500, 200, 450, 300);
		getContentPane().setLayout(null);
		
		JLabel lblRunCampign = new JLabel("Run Campign");
		lblRunCampign.setBackground(Color.LIGHT_GRAY);
		lblRunCampign.setFont(new Font("SimSun-ExtB", Font.ITALIC, 30));
		lblRunCampign.setHorizontalAlignment(SwingConstants.CENTER);
		lblRunCampign.setBounds(61, 11, 272, 67);
		getContentPane().add(lblRunCampign);
		
		JLabel lblChooseCampign = new JLabel("Choose campign: ");
		lblChooseCampign.setFont(new Font("Times New Roman", Font.BOLD, 15));
		lblChooseCampign.setBounds(10, 92, 122, 30);
		getContentPane().add(lblChooseCampign);
		
		CampigncomboBox = new JComboBox();
		CampigncomboBox.setBounds(142, 98, 194, 20);
		getContentPane().add(CampigncomboBox);
		
		 btnStartButton = new JButton("START");
		 btnStartButton.setBounds(110, 140, 148, 23);
		getContentPane().add(btnStartButton);
		
		btnMainMenu = new JButton("Main menu");
		btnMainMenu.setBounds(326, 0, 106, 23);
		getContentPane().add(btnMainMenu);
		
		lblwarning = new JLabel("");
		lblwarning.setBounds(85, 178, 200, 50);
		getContentPane().add(lblwarning);
		lblwarning.setVisible(false);
		
		setVisible(true);
	}
	
	public JLabel getLblwarning() {
		return lblwarning;
	}

	public void setLblwarning(JLabel lblwarning) {
		this.lblwarning = lblwarning;
	}

	public void addStartbtnAC(ActionListener I)
	{
		btnStartButton.addActionListener(I);
	}
	public void addMENUbtnAC(ActionListener I)
	{
		btnMainMenu.addActionListener(I);
	}
	public JComboBox getItemBOx()
	{
		return CampigncomboBox;
	}
	public String getSeclectCampignItemS()
	{
		return (String) CampigncomboBox.getSelectedItem();
	}
}
